<template>
	
	<form @submit="submit" :data-action="`/api/gasReplace/save?stationId=${param.id}`">
			
			<view class="fixAuto bb middle">
				<view class="w100">
					标准物质名称
				</view>
				<view>
					<input type="text" name="x.name|标准物质名称|0~200" placeholder="请输入标准物质名称">
				</view>
			</view>
			<view class="fixAuto bb middle">
				<view class="w100">
					气体浓度
				</view>
				<view>
					<input type="text" name="x.gasConcentration|气体浓度" placeholder="请输入气体浓度">
				</view>
			</view>
			<view class="fixAuto bb middle">
				<view class="w100">
					单位
				</view>
				<view>
					<input type="text" name="x.unit|单位|0~20" placeholder="请输入单位">
				</view>
			</view>
			<view class="fixAuto bb middle">
				<view class="w100">
					数量
				</view>
				<view>
					<input type="number" name="x.count|数量" placeholder="请输入数量">
				</view>
			</view>
			<view class="fixAuto bb ">
				<view class="w100">
					有效期
				</view>
				<view class="father">
					<view class="flex " :class="deadline?'':'rt'">
						<view :class="deadline?'black':'gray'">
							{{deadline?deadline:'请选择'}}
							<input type="text" name="x.deadline|有效期" v-model="deadline" style="display: none;">
						</view>
						<view class="sIcon-arrowRight fz14 grey pl10"></view>
					</view>
					<view class="abs">
						<picker mode="date" @change="deadline = $event.detail.value">
							<view class="op0">有效期</view>
						</picker>
					</view>
				</view>
			</view>
			
			
			<view class="plr100 pd30">
				<button form-type="submit" class="btn block rds23">
					保存记录
				</button>
			</view>
		</form>

	</layout>
</template>

<script>
	export default {
		data() {
			return {
				param:{id:""} ,
				deadline:""
			}
		},
		onLoad(params) {
			this.param = params ;
		},
		methods: {
			
			submit:function(e){
				this.form.submit(e , this.success);
			},
			
			success:function(e){
				this.kit.goSuccessBack("保存成功");
			}
		}
	}
</script>
<style>
	page{
		background-color: #fff;
	}
</style>